import 'package:flutter/material.dart';
import 'package:qunaimedical/components/custom_avatar.dart';

class ItemChat extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
          border: Border(bottom: Divider.createBorderSide(context))),
      child: Row(
        children: [
          CustomAvatar(margin: EdgeInsets.all(8)),
          Expanded(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.stretch,
              children: [
                Text('张三'),
                Padding(
                  padding: const EdgeInsets.only(right: 8.0),
                  child: Text(
                    '消息内容',
                    style: Theme.of(context).textTheme.caption,
                    maxLines: 1,
                    overflow: TextOverflow.ellipsis,
                  ),
                ),
              ],
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(right: 8.0),
            child: Column(
              children: [
                Text('2020-01-01', style: Theme.of(context).textTheme.caption),
                Text(''),
              ],
            ),
          )
        ],
      ),
    );
  }
}
